package pe.com.bbva.ge.domain.solicitud;

// Generated 02/04/2014 12:12:20 PM by Hibernate Tools 3.4.0.CR1

import java.math.BigInteger;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import javax.persistence.UniqueConstraint;

import pe.com.bbva.ge.domain.base.Auditoria;
import pe.com.bbva.ge.domain.configuracion.Casetera;

/**
 * DetalleCasetera generated by hbm2java
 */
@Entity
@Table(name = "SOL_DETALLE_CASETERA")
public class DetalleCasetera extends Auditoria {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(unique = true, nullable = false, precision = 19)
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "SEQ_DETALLE_CASETERA")
	@TableGenerator(name = "SEQ_DETALLE_CASETERA", table = DetalleCasetera.SEQ_TABLA, pkColumnName = DetalleCasetera.SEQ_TABLA_PK, initialValue = 1, valueColumnName = DetalleCasetera.SEQ_TABLA_COLUMN, pkColumnValue = "pe.com.bbva.ge.domain.solicitud.DetalleCasetera", allocationSize = 1)
	private long id;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((casetera == null) ? 0 : casetera.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		DetalleCasetera other = (DetalleCasetera) obj;
		if (casetera == null) {
			if (other.casetera != null)
				return false;
		} else if (!casetera.equals(other.casetera))
			return false;
		return true;
	}
	
	//

	private BigInteger cantidad;

	private String observacion;

	//uni-directional many-to-one association to Casetera
	@ManyToOne
	@JoinColumn(name="CASETERA")
	private Casetera casetera;

	//bi-directional many-to-one association to Destino
	@ManyToOne
	@JoinColumn(name="DESTINO")
	private Destino destino;

	public BigInteger getCantidad() {
		return this.cantidad;
	}

	public void setCantidad(BigInteger cantidad) {
		this.cantidad = cantidad;
	}

	public String getObservacion() {
		return this.observacion;
	}

	public void setObservacion(String observacion) {
		this.observacion = observacion;
	}

	public Casetera getCasetera() {
		return this.casetera;
	}

	public void setCasetera(Casetera casetera) {
		this.casetera = casetera;
	}

	public Destino getDestino() {
		return destino;
	}

	public void setDestino(Destino destino) {
		this.destino = destino;
	}
}
